<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>阿巴阿巴</title>
    <style>
        * {
            padding: 0;
            margin: 0;
        }

        @keyframes rotate {
            0% {
                transform: rotateY(0);
            }

            100% {
                transform: rotateY(360deg);
            }
        }

        body {
            perspective: 16rem;
        }

        .box {
            position: relative;
            height: 8rem;
            width: 5.3333rem;
            margin: 8rem auto;
            transform-style: preserve-3d;
            transition: all 4s;
            animation: rotate 8s linear infinite;
        }

        .box>div {
            position: absolute;
            top: 0;
            left: 0;
            font-size: 1.3rem;
            background: -webkit-linear-gradient(left, green, yellow);
        }

        .box>div:nth-child(1) {
            transform: rotateY(0) translateZ(6.6667rem);
        }

        .box>div:nth-child(2) {
            transform: rotateY(72deg) translateZ(6.6667rem);
        }

        .box>div:nth-child(3) {
            transform: rotateY(144deg) translateZ(6.6667rem);
        }

        .box>div:nth-child(4) {
            transform: rotateY(216deg) translateZ(6.6667rem);
        }

        .box>div:nth-child(5) {
            transform: rotateY(288deg) translateZ(6.6667rem);
        }
    </style>
</head>

<body>
    <section class="box">
        <div>阿巴阿巴</div>
        <div>阿巴阿巴</div>
        <div>阿巴阿巴</div>
        <div>阿巴阿巴</div>
        <div>阿巴阿巴</div>
    </section>
</body>

</html>